#include<iostream>
using namespace std;


int main()
{
    int n; 
    int i = 1;
    while (cin >> n)
    {
        if (n == 250)
        {
            cout << i << endl;
            break;
        }
        i++;
    }
    return 0;
}